/*
 * =====================================================================================
 *
 *       Filename:  IObserver.h
 *
 *    Description:
 *
 *        Version:  1.0
 *        Created:  01/04/2022 11:05:01 AM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  first_name last_name (fl), fl@my-company.com
 *        Company:  my-company
 *
 * =====================================================================================
 */

#pragma once
#include <iostream>
using std::string;
class IObserver {
  public:
    IObserver(string _name) {
        this->m_name = _name;
    } virtual ~ IObserver(void) {
    }
    virtual void Update(string context) = 0;
    virtual string GetName() = 0;   //为c++单独增加的函数，用于删除时查找观察者。

  protected:
    string m_name;
};
